package com.huahang.fashionpress.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huahang.fashionpress.model.Role;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RoleMapper extends BaseMapper<Role> {
    @Select("select role_id from t_role where role_name=#{name}")
    int selectroleIdByroleName(String name);
    @Select("select role_name from t_role where role_id=#{id}")
    String selectroleNameByroleId(int id);
    @Select("select * from t_role where role_id=#{id}")
    Role selectroleByroleId(int id);
    @Select("select * from t_role")
    List<Role> selectAllRole();
}
